/**
 * 意见反馈模块
 * user 用户ID
 * type 反馈内容
 * desc 描述信息
 * images 截图
 * create_time 创建时间
 */
import mongoose from 'mongoose';

const FeedbackSchema = new mongoose.Schema(
  {
    user: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
    type: String,
    desc: String,
    images: [String],
    solved: Boolean,
    create_time: { type: Date, default: new Date() }
  },
  { versionKey: false }
);

const Feedback = mongoose.model('Feedback', FeedbackSchema);

export { Feedback };
